import {
    request
} from './request'
import {
    requestNews
} from './requestNews'
import qs from 'qs'







// 获取规则
export function listRules(orderObj) {
    return request({
        url: 'Rule/getRuleList',
        method: 'post',
        data: qs.stringify(orderObj),
    })
}

// 添加规则
export function addRule(orderObj) {
    return request({
        url: 'Rule/addRule',
        method: 'post',
        data: qs.stringify(orderObj),
    })
}

// 获取储值金 抽奖金额
export function listStored(orderObj) {
    return request({
        url: 'stored/listStored',
        method: 'post',
        data: qs.stringify(orderObj),
    })
}
// 添加 储值金 抽奖金额
export function addStored(orderObj) {
    return request({
        url: 'stored/addStored',
        method: 'post',
        data: qs.stringify(orderObj),
    })
}
// 删除 储值金 抽奖金额
export function deleteStored(orderObj) {
    return request({
        url: 'stored/deleteStored',
        method: 'post',
        data: qs.stringify(orderObj),
    })
}
// 获取抽奖用户列表
export function getActivityLotteryList(orderObj) {
    return request({
        url: 'lottery/getActivityLotteryList',
        method: 'post',
        data: qs.stringify(orderObj),
    })
}

// 审核通过 驳回  发放奖金
export function authActivityLottery(orderObj) {
    return request({
        url: 'lottery/authActivityLottery',
        method: 'post',
        data: qs.stringify(orderObj),
    })
}

// 获取  海报  微信图片
export function listShare(orderObj) {
    return request({
        url: 'Share/listShare',
        method: 'post',
        data: qs.stringify(orderObj),
    })
}
// 删除  海报  微信图片
export function delShare(orderObj) {
    return request({
        url: 'Share/delShare',
        method: 'post',
        data: qs.stringify(orderObj),
    })
}

// 添加  海报  微信  图片
export function addShare(orderObj) {
    return request({
        url: 'Share/addShare',
        method: 'post',
        data: orderObj,
        headers: {
            'Content-Type': 'multipart/form-data'
        }
    })
}










//获取提问列表
export function addRechargeRule(orderObj) {
    return request({
        url: 'active/addRechargeRule',
        method: 'post',
        data: qs.stringify(orderObj)
    })
}

//获取回答列表
export function deleteRechargeRule(orderObj) {
    return request({
        url: 'deleteRechargeRuleModularaAction.action',
        method: 'post',
        data: qs.stringify(orderObj)
    })
}

//删除answer
export function updateRechargeRule(orderObj) {
    return request({
        url: 'active/updateRechargeRule',
        method: 'post',
        data: qs.stringify(orderObj)
    })
}

//审核通过
export function getRechargeRuleList(orderObj) {
    return request({
        url: 'active/getRechargeRuleList',
        method: 'post',
        data: qs.stringify(orderObj),
    })
}


//获取门店充值记录
export function getShopDataList(orderObj) {
    return requestNews({
        url: 'recharge/getShopRechargeUser',
        method: 'post',
        data: qs.stringify(orderObj),
    })
}
//获取个人详细记录
export function getUserDateilList(orderObj) {
    return requestNews({
        url: 'recharge/getRechargeUser',
        method: 'post',
        data: qs.stringify(orderObj),
    })
}


// 添加 充值项
export function addStorage(orderObj) {
    return requestNews({
        url: 'stored/addStorage',
        method: 'post',
        // data: qs.stringify(orderObj),
        data: orderObj,
        headers: {
            'Content-Type': 'multipart/form-data'
        }
    })
}

//获取充值项
export function listStorage(orderObj) {
    return requestNews({
        url: 'stored/listStorage',
        method: 'post',
        data: qs.stringify(orderObj),
    })
}
//删除充值项
export function deleteStorage(orderObj) {
    return requestNews({
        url: 'stored/deleteStorage',
        method: 'post',
        data: qs.stringify(orderObj),
    })
}
// 启用 禁用 充值项
export function updateStorage(orderObj) {
    return requestNews({
        url: 'stored/updateStorage',
        method: 'post',
        data: qs.stringify(orderObj),
    })
}
// 更新规则
export function updateRules(orderObj) {
    return requestNews({
        url: 'stored/updateRules',
        method: 'post',
        data: qs.stringify(orderObj),
    })
}
